<%
'Pass Extension
Function getRandomName(fileType)
	randomize
	randNumber = int(90000 * rnd) + 10000
	fileName = year(now) & month(now) & day(now) & hour(now) & minute(now) & second(now) & randNumber & "." & fileType
	getRandomName = fileName
End Function

'Pass File Name
Function getExt(fileName)
	If inStr(fileName,".") then
		ext = LCase(Mid(fileName,InStrRev(fileName, ".") + 1))
		getExt = ext
	Else 
		getExt = ""
	End If
End Function

'Pass File Type and the Accepted Types
'fileTypes is like this:
'fileTypes = Array("png","jpg","bmp")
Function fileValid(thisFileType,fileTypes)
	fileValid = False
	For Each fileType In fileTypes
		If thisFileType = fileType then
			fileValid = True
			Exit For
		End If
	Next
End Function
%>
